#ifndef _sgp4_math_
#define _sgp4_math_
/*     ----------------------------------------------------------------
*
*                                 sgp4ext.h
*
*    this file contains extra routines needed for the main test program for sgp4.
*    these routines are derived from the astro libraries.
*
*                            companion code for
*               fundamentals of astrodynamics and applications
*                                    2007
*                              by david vallado
*
*       (w) 719-573-2600, email dvallado@agi.com
*
*    current :
*              20 apr 07  david vallado
*                           misc documentation updates
*    changes :
*              14 aug 06  david vallado
*                           original baseline
*       ----------------------------------------------------------------      */

#include <string.h>
#include <math.h>

#define pi 3.14159265358979323846


// ------------------------- function declarations -------------------------
class sgp4_math {
	public:
	static double  sgn
        (
          double x
        );

	static double  mag
        (
          double x[3]
        );

	static void    cross
        (
          double vec1[3], double vec2[3], double outvec[3]
        );

	static double  dot
        (
          double x[3], double y[3]
        );

	static double  angle
        (
          double vec1[3],
          double vec2[3]
        );

	static void    newtonnu
        (
          double ecc, double nu,
          double& e0, double& m
        );

	double  asinh
        (
          double xval
        );

	static void    rv2coe
        (
          double r[3], double v[3], double mu,
          double& p, double& a, double& ecc, double& incl, double& omega, double& argp,
          double& nu, double& m, double& arglat, double& truelon, double& lonper
        );
};
#endif

